
package gui.tools;

import database.DatabaseConnection;
import gui.ZeroMS_UI;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.table.DefaultTableModel;
import org.jvnet.substance.skin.SubstanceBusinessBlackSteelLookAndFeel;
import server.MapleItemInformationProvider;

/**
 *
 * @author Administrator
 */
public class 任务控制台 extends javax.swing.JFrame {


    public 任务控制台() {
        ImageIcon icon = new ImageIcon(getClass().getClassLoader().getResource("Image/Icon.png"));
        setIconImage(icon.getImage());
        setTitle("任务控制台");
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        任务框 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        任务列表 = new javax.swing.JTable();
        jScrollPane2 = new javax.swing.JScrollPane();
        任务简介 = new javax.swing.JTextPane();
        jLabel1 = new javax.swing.JLabel();
        任务名称 = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        任务编号 = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        任务编号1 = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();

        setResizable(false);
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));
        jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        任务框.setBackground(new java.awt.Color(255, 255, 255));
        任务框.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "任务列表", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("幼圆", 0, 24), new java.awt.Color(0, 0, 0))); // NOI18N
        任务框.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        任务列表.setModel(new DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "序号", "任务编号", "任务名称", "完成人数"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(任务列表);
        if (任务列表.getColumnModel().getColumnCount() > 0) {
            任务列表.getColumnModel().getColumn(0).setResizable(false);
            任务列表.getColumnModel().getColumn(0).setPreferredWidth(100);
            任务列表.getColumnModel().getColumn(1).setResizable(false);
            任务列表.getColumnModel().getColumn(1).setPreferredWidth(100);
            任务列表.getColumnModel().getColumn(2).setResizable(false);
            任务列表.getColumnModel().getColumn(2).setPreferredWidth(200);
            任务列表.getColumnModel().getColumn(3).setResizable(false);
            任务列表.getColumnModel().getColumn(3).setPreferredWidth(100);
        }

        任务框.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 40, 420, 690));

        jPanel1.add(任务框, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 20, 500, 670));

        jScrollPane2.setViewportView(任务简介);

        jPanel1.add(jScrollPane2, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 100, 770, 140));

        jLabel1.setFont(new java.awt.Font("幼圆", 0, 18)); // NOI18N
        jLabel1.setText("任务简介：");
        jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 70, 100, 30));
        jPanel1.add(任务名称, new org.netbeans.lib.awtextra.AbsoluteConstraints(680, 20, 200, 30));

        jLabel2.setFont(new java.awt.Font("幼圆", 0, 18)); // NOI18N
        jLabel2.setText("任务编号：");
        jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(900, 20, 100, 30));
        jPanel1.add(任务编号, new org.netbeans.lib.awtextra.AbsoluteConstraints(990, 20, 200, 30));

        jLabel3.setFont(new java.awt.Font("幼圆", 0, 18)); // NOI18N
        jLabel3.setText("任务名称：");
        jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 20, 100, 30));

        jLabel4.setFont(new java.awt.Font("幼圆", 0, 18)); // NOI18N
        jLabel4.setText("任务需求：");
        jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(600, 330, 100, 30));
        jPanel1.add(任务编号1, new org.netbeans.lib.awtextra.AbsoluteConstraints(690, 330, 200, 30));

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "触发要求", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("幼圆", 0, 18), new java.awt.Color(0, 0, 0))); // NOI18N
        jPanel1.add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(1010, 260, 350, 250));

        getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1410, 760));

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

 
    public static void main(String args[]) {
        try {
            for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
            Logger.getLogger(ZeroMS_UI.class.getName()).log(Level.SEVERE, null, ex);
        }
        //</editor-fold>
        任务控制台.setDefaultLookAndFeelDecorated(true);
        JDialog.setDefaultLookAndFeelDecorated(true);
        try {
            UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
            UIManager.setLookAndFeel(new SubstanceBusinessBlackSteelLookAndFeel());
            // UIManager.setLookAndFeel(new SubstanceBusinessLookAndFeel());
        } catch (Exception e) {
            e.printStackTrace();
        }
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new 任务控制台().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTable 任务列表;
    private javax.swing.JTextField 任务名称;
    private javax.swing.JPanel 任务框;
    private javax.swing.JTextPane 任务简介;
    private javax.swing.JTextField 任务编号;
    private javax.swing.JTextField 任务编号1;
    // End of variables declaration//GEN-END:variables
}
